<!--
 * @FileDescription 消息弹窗
 * @Author 杨宇翔
 * @Date 20220811 13:56:39
 * @LastEditors 杨宇翔
 * @LastEditTime 20220811 13:56:39
-->
<template>
    <div class="message-box">
        <div class="header">
            <span>{{ ModalComponent.Default.Options.Title ?? '提示' }}</span>
            <span class="material-icons" @click="ModalComponent.Default.TrySetResult('取消')">cancel</span>
        </div>
        <div class="content">
            {{ ModalComponent.Default.Options.Content }}
        </div>
        <div class="button-container">
            <button class="reset" type="button" v-for="option of ModalComponent.Default.Options.Buttons"
                @click="ModalComponent.Default.TrySetResult(option)">
                <span>{{ option }}</span>
            </button>
        </div>
    </div>
</template>

<script setup lang="ts">
import ModalComponent from '@runtime/module/Modal/ModalComponent';
</script>

<style scoped>
.message-box {
    width: 64rem;
    height: 38rem;

    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;

    gap: 4rem;

    border-radius: 2rem;
    border: solid 0.6rem transparent;
    background-image: linear-gradient(#131620, #131620),
        linear-gradient(90deg, #218cde, #807de1);
    background-origin: border-box;
    background-clip: content-box, border-box;
}

.header {
    width: 100%;

    padding: 2rem 2rem 0 2rem;

    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header>span:first-of-type {
    color: white;
    font-size: 2.4rem;
    font-weight: 500;
}

.header>.material-icons {
    color: #81859C;
    font-size: 3.6rem;
}

.content {
    flex-grow: 1;

    color: #81859C;
    font-size: 2.4rem;
}

.button-container {
    width: 100%;

    padding-bottom: 4rem;

    display: flex;
    justify-content: space-evenly;
}

button {
    width: 25rem;
    height: 10rem;

    /* background-image: url('/static/InertialNavigation/btn-bg.png'); */
    background-repeat: no-repeat;
    background-position-y: -0.5rem;
}

button>span {
    display: inline-block;

    color: white;
    font-size: 3rem;

    text-indent: 1em;
    letter-spacing: 1em;
}
</style>